Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove support/donation for macOS FTP builds, as it's not supported outside of AppStore #1074

Merged
merged 4 commits into from
Jan 17, 2025

Conversation

BPerlakiH
Copy link
Collaborator

@BPerlakiH BPerlakiH commented Jan 10, 2025

Fixes: #1055

Fix the CD process for macOS.
In short: the in-app-purchase is not supported by Developer ID signed apps (outside of the App Store), therefore we cannot use that capability in the FTP macOS build.
Although Apple Pay itself is supported, the In App Purchase capability that we use (for Donation - a purchase of a non-digital good) is not supported.

The found Apple reference:
https://developer.apple.com/help/account/reference/supported-capabilities-macos

We need a follow up discussion, if we want to hide the support button in this case or maybe use a direct link instead (since this build is not going to be verified by Apple).


After the comments, the approach is that we inject the HIDE_DONATION: true key/value into the Support/Info.plist file for macOS FTP builds. For all other builds the fallback value is false (do not hide). The condition whether to display the Support / Donation button is also dependent on the type of brand we run, therefore custom apps are not affected.

@codecov-commenter
Copy link

codecov-commenter commented Jan 10, 2025

Codecov Report

Attention: Patch coverage is 50.00000% with 1 line in your changes missing coverage. Please review.

Project coverage is 36.21%. Comparing base (1a673e5) to head (5446417).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
Model/Brand.swift 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1074      +/-   ##
==========================================
- Coverage   38.31%   36.21%   -2.11%     
==========================================
  Files         120      129       +9     
  Lines        6511     7542    +1031     
==========================================
+ Hits         2495     2731     +236     
- Misses       4016     4811     +795     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@kelson42
Copy link
Contributor

We need a follow up discussion, if we want to hide the support button in this case or maybe use a direct link instead (since this build is not going to be verified by Apple).

@BPerlakiH Please open an issue for that asap, otherwise we will forget

@kelson42
Copy link
Contributor

kelson42 commented Jan 10, 2025

We need a follow up discussion, if we want to hide the support button in this case or maybe use a direct link instead (since this build is not going to be verified by Apple).

@BPerlakiH Please open an issue for that asap, otherwise we will forget

Actually, if the feature is not working, it has to be hidden. You can do that here in this PR. you should detect the way the app is compiled and act accordingly.

rgaudin
rgaudin previously approved these changes Jan 10, 2025
Copy link
Member

@rgaudin rgaudin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM but please rename the PR to something more meaningful.

@BPerlakiH BPerlakiH changed the title Fix CD for macOS Remove support/donation for macOS FTP builds, as it's not supported outside of AppStore Jan 12, 2025
@BPerlakiH
Copy link
Collaborator Author

BPerlakiH commented Jan 12, 2025

@kelson42 @rgaudin I've updated both the name of the PR, and the code. With this the support/donation button is conditionally hidden for macOS FTP builds (for Kiwix only).

Other brands (custom apps) are already filtered out by their brand (non-Kiwix), so this has no effect for them.

@BPerlakiH BPerlakiH requested a review from rgaudin January 12, 2025 11:38
@kelson42
Copy link
Contributor

CI red

@BPerlakiH
Copy link
Collaborator Author

Please merge this other PR first: #1076

@kelson42 kelson42 merged commit d28093f into main Jan 17, 2025
7 checks passed
@kelson42 kelson42 deleted the fix-cd-builds branch January 17, 2025 09:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

MacOS FTP release signing fails
4 participants